﻿using Sdg.Domain.Services;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sdg.Domain.BizObj
{
    public class TableSettings : IBizObj
    {
        private List<TableColumn> _columns = new List<TableColumn>();
        public bool ClearBeforeFilling { get; set; }
        public string Name { get; set; }
        public int ObjectId { get; set; }
        public TableColumn[] Columns { get { return _columns.ToArray(); } }
        public int NewRowCount { get; set; }

        public void AddColumn(TableColumn column)
        {
            _columns.Add(column);
        }

        public void AddColumn(string name, Type type, IColumnDataGenerator dataGen)
        {
            AddColumn(new TableColumn(name, type, dataGen));
        }

        public override string ToString()
        {
            return Name;
        }


    }
}
